package org.come.Jpanel;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.DefaultListModel;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;

import org.come.until.FormsManagement;

import com.tool.tcpimg.UIUtils;

public class FaShuZengQiangJpanel extends JPanel {
	private DefaultListModel<String> dlm;
	private DefaultListModel<String> dlm1;

	private JLabel AreaTestJlabel;// 空隙效果

	public DefaultListModel<String> getDlm() {
		return dlm;
	}

	public void setDlm(DefaultListModel<String> dlm) {
		this.dlm = dlm;
	}

	public DefaultListModel<String> getDlm1() {
		return dlm1;
	}

	public void setDlm1(DefaultListModel<String> dlm1) {
		this.dlm1 = dlm1;
	}

	public JLabel getAreaTestJlabel() {
		return AreaTestJlabel;
	}

	public void setAreaTestJlabel(JLabel areaTestJlabel) {
		AreaTestJlabel = areaTestJlabel;
	}

	public JList<String> getListNo1() {
		return listNo1;
	}

	public void setListNo1(JList<String> listNo1) {
		this.listNo1 = listNo1;
	}

	public JList<String> getListNo2() {
		return listNo2;
	}

	public void setListNo2(JList<String> listNo2) {
		this.listNo2 = listNo2;
	}

	private JList<String> listNo1;
	private JList<String> listNo2;

	public FaShuZengQiangJpanel() {

		this.setBackground(new Color(0, 0, 0, 0));
		this.setPreferredSize(new Dimension(290, 150));
		this.setLayout(null);
		dlm = new DefaultListModel<String>();

		dlm1 = new DefaultListModel<String>();

		listNo1 = new JList<String>();
		listNo1.setBounds(20, 26, 130, 300);
		listNo1.setForeground(Color.white);
		listNo1.setFont(UIUtils.TEXT_FONT);
		listNo1.setBackground(UIUtils.Color_BACK);
		listNo1.setModel(dlm);
		listNo1.addMouseListener(new MouseListener() {

			@Override
			public void mouseReleased(MouseEvent e) {
				// TODO Auto-generated method stub

			}

			@Override
			public void mousePressed(MouseEvent e) {
				// TODO Auto-generated method stub

			}

			@Override
			public void mouseExited(MouseEvent e) {
				// TODO Auto-generated method stub

			}

			@Override
			public void mouseEntered(MouseEvent e) {
				// TODO Auto-generated method stub

			}

			@Override
			public void mouseClicked(MouseEvent e) {
				// 打开了窗体
				if (e.isMetaDown()) {// 检测鼠标右键单击
					FormsManagement.HideForm(8);
				}

			}
		});

		this.add(listNo1);

		listNo2 = new JList<String>();
		listNo2.setBounds(150, 26, 130, 300);
		listNo2.setForeground(Color.white);
		listNo2.setFont(UIUtils.TEXT_FONT);
		listNo2.setBackground(UIUtils.Color_BACK);
		listNo2.setModel(dlm1);
		listNo2.addMouseListener(new MouseListener() {

			@Override
			public void mouseReleased(MouseEvent e) {
				// TODO Auto-generated method stub

			}

			@Override
			public void mousePressed(MouseEvent e) {
				// TODO Auto-generated method stub

			}

			@Override
			public void mouseExited(MouseEvent e) {
				// TODO Auto-generated method stub

			}

			@Override
			public void mouseEntered(MouseEvent e) {
				// TODO Auto-generated method stub

			}

			@Override
			public void mouseClicked(MouseEvent e) {
				// 打开了窗体
				if (e.isMetaDown()) {// 检测鼠标右键单击
					FormsManagement.HideForm(8);
				}

			}
		});
		this.add(listNo2);

		// this.pack();
	}

	private ImageIcon icon = new ImageIcon("inkImg/hongmu/2/kx_zq.png");

	@Override
	protected void paintComponent(Graphics g) {
		// TODO Auto-generated method stub
		super.paintComponent(g);

		g.drawImage(icon.getImage(), 0, 0, 290, 24, this);
		// 设置背景
		// g.drawImage(new ImageIcon("inkImg/hongmu/2/中间289×1px.png").getImage(),
		// 0, 24, 290, 130 ,this);
	}
}
